include ../common.mk

#NVCCFLAGS += -v
#NVCCFLAGS += -v --keep

CPPFLAGS += -I$(MPI_INCLUDE)
LIBS += -L../src -lcuos -L$(MPI_LIB) -lmpi

SRCS=test_mpi.cu test_pinned_pool.cu
PRGS=$(SRCS:%.cu=%)

all: $(PRGS)

test_mpi: test_mpi.o ../src/libcuos.a
	$(VERBOSE)$(NVCC) $(NVCCFLAGS) $(CPPFLAGS) $(SMVERSIONFLAGS) $(LIBS) -o $@ $<

clean:
	rm -f $(PRGS) *.cu.* *.{hash,ptx,cubin,i,ii} *.cudafe?.* *.fatbin.* *.o .depend

.depend: $(SRCS)
	$(VERBOSE)$(NVCC) $(NVCCFLAGS) $(SMVERSIONFLAGS) $(CPPFLAGS) -M $(SRCS) > .depend

#ifeq (.depend, $(wildcard .depend))
-include .depend
#endif
